Quantifying pattern separation

Pattern separation will result when the similarity between the patterns produced by the network is larger than the orginal similarity between these patterns.


In [3]:
import numpy as np
from sklearn.metrics.pairwise import cosine_similarity

Input patterns


In [38]:
IN1 = np.zeros(100, dtype=int)
IN2 = np.zeros(100,dtype=int)
IN2[:50] = 1

In [40]:
np.corrcoef(IN1,IN2)


/home/jguzman/.local/lib/python2.7/site-packages/numpy-1.11.1-py2.7-linux-x86_64.egg/numpy/lib/function_base.py:2569: RuntimeWarning: invalid value encountered in true_divide
  c /= stddev[:, None]
/home/jguzman/.local/lib/python2.7/site-packages/numpy-1.11.1-py2.7-linux-x86_64.egg/numpy/lib/function_base.py:2570: RuntimeWarning: invalid value encountered in true_divide
  c /= stddev[None, :]
Out[40]:
array([[ nan,  nan],
       [ nan,   1.]])

In [36]:
np.dot?

In [ ]: